<div class="top">
    <nav class="navbar navbar-default" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header">
                <a class="navbar-brand" href="/">汕尾职业技术学院-院宿委会</a>
            </div>
            <div>
                <ul class="nav navbar-nav navbar-right">
                    <li>
                        <div>
                            <form action="/search" method="get" class="navbar-form navbar-left" role="search">
                                <div class="form-group col-sm-10" style="overflow: hidden;">
                                    <input type="text" name="search" class="form-control" placeholder="输入姓名/手机/学号查询">
                                </div>
                                <button type="submit" class="btn btn-default col-sm-2" style="margin-left: -6px;"><i class="glyphicon glyphicon-search"></i></button>
                            </form>
                        </div>
                    </li>
                    <li class="dropdown">
                        {if condition="$fun eq 1"}
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            {$data.name}
                            <b class="caret"></b>
                        </a>
                        {else /}
                        <!-- Button to trigger modal -->
                        <a id="modal-855067" class="dropdown-toggle text-center" href="#modal-container-855067" data-toggle="modal">登录　</a>
                        {/if}


                        <ul class="dropdown-menu">

                            <li>
                                <a href="#">个人中心</a>
                            </li>
                            <li>
                                <a href="#">管理中心</a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a href="/quit">退出</a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
</div>

<!-- Modal -->
<div class="modal fade" id="modal-container-855067" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="myModalLabel">登录院宿委会系统</h4>
            </div>
            <form action="/login" method="post">
                <div class="modal-body">
                    <div class="form-group">
                        <label for="login_name"  class="col-sm-2 control-label">名字</label>
                        <div class="col-sm-7">
                            <input type="text" id="login_name" name="login_name" class="form-control" placeholder="请输入学号/手机号">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="login_password" class="col-sm-2 control-label">密码</label>
                        <div class="col-sm-7">
                            <input type="password" id="login_password" name="login_password" class="form-control" placeholder="请输入密码">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="code" class="col-sm-2 control-label">验证码</label>
                        <div class="col-sm-7">
                            <input type="text" id="code" name="code" class="form-control" placeholder="请输入验证码">
                        </div>
                        <div class="col-sm-3" style="margin-left: -20px;">
                            {:captcha_img()}
                        </div>
                    </div>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default">关闭</button>
                    <button type="submit" class="btn btn-primary">登录</button>
                </div>
            </form>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->